package sky.treasure.properties;

import sky.treasure.Cell;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: Gauss
 * Date: 09.01.14
 * Time: 22:52
 * To change this template use File | Settings | File Templates.
 */
public class AreaPropertyHolder {
    private ArrayList<AreaProperty> properties;

    public AreaPropertyHolder() {
        properties = new ArrayList<AreaProperty>();
    }

    public AreaPropertyHolder addProperty(AreaProperty areaProperty) {
        properties.add(areaProperty);
        return this;
    }

    public Cell fillCell(Cell cell) {
        for (AreaProperty areaProperty: properties) {
            areaProperty.modifyCell(cell);
        }
        return cell;
    }
}
